// 对象
export const setData = (value, data) => {
	// 封装数据持久化
	return uni.setStorageSync(value, JSON.stringify(data))
}

// 对象格式
export const getData = (key) => {
	let q = uni.getStorageSync(key)
	if (q !== '') {
		let w = JSON.parse(q)
		return JSON.parse(w)
	}
}

// 数组格式
export const getStorage = (key) => {
	let q = uni.getStorageSync(key)
	if (q.length !== 0) {
		return JSON.parse(q)
	}
}

// 清除本地存储的key
export const removeList = (key) => {
	return uni.removeStorageSync(key)
}

// 用户信息
export const userInfoObj = {
	name: '默认昵称',
	snowId: '666666',
	avatar: 'https://snowcyans.gitee.io/static-warehouse/static/jx.jpg',
	bgImgUrl: 'https://snowcyans.gitee.io/static-warehouse/static/jx5.jpg',
	snowFlag: true,
	snowNum: 666,
}


// Q图数据
export const list = [{
		id: 1,
		name: 'Q版熏儿',
		imgUrl: 'https://snowcyans.gitee.io/static-warehouse/static/Qxe.png',
		flag: false,
		num: null,
	},
	{
		id: 2,
		name: 'Q版云韵',
		imgUrl: 'https://snowcyans.gitee.io/static-warehouse/static/Qyy.png',
		flag: false,
		num: null,
	},
	{
		id: 3,
		name: 'Q版柳神',
		imgUrl: 'https://snowcyans.gitee.io/static-warehouse/static/Qls.png',
		flag: false,
		num: null,
	}
]